package com.example.front.task;

import com.example.front.arrange.AbstractTask;
import com.example.front.arrange.TaskDependent;
import lombok.extern.slf4j.Slf4j;

/**
 * EndTask
 *
 * @author liming2
 * @date 2023/11/7 14:07
 */
@Slf4j
@TaskDependent({DdTask.class})
public class EndTask extends AbstractTask<User> {

    private int a = 0;

    @Override
    protected User handle() throws Exception {
        Thread.sleep(1000);
        Taxi taxiD = this.getDependResult(DdTask.class);
        a++;
        //log.info("EndTask depend:{},a={}", taxiD.getNameTaxi(), a);
        return new User(taxiD.getNameTaxi() + "->E", a);
    }
}
